﻿<!DOCTYPE html>
<?php
include_once '../conn/mysql.php';
$res=sql('s','home',"*","");
$info=firstrow($res);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户注册--<?=gv($info_copy,"title");?></title>
<link href="../tp/3/css/style.css" rel="stylesheet" type="text/css" />
<link href="../tp/3/css/index_style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
//检测用户名是否合法
function check_usr(obj){
 var objvalue = obj.value;
 var b=/^[a-zA-Z\d]\w{2,10}[a-zA-Z\d]$/;
 if (!b.test(objvalue)) {
  return false;
 }
}
function checkback(){
 var backvalue = null;
 if(xmlHttp.readyState==1)
 {document.getElementById('checkusr').innerHTML ="<font color='#ff0000'>检测中...</font>";}
 if (xmlHttp.responseText == 1) {                                                                   //check.php 没注册返回1，注册返回2
  backvalue = "<font color='#00c72e'>可以使用！</font>";
 }else {
  backvalue="<font color='#ff0000'>抱歉，已经被注册啦！</font>";
 }
 if (xmlHttp.readyState == 4) {
  document.getElementById('checkusr').innerHTML = backvalue;
 }
}
//判断密码输入是否合法，一个是长度，一个是没有特殊字符
function check_psw(obj){
 checkpsw=obj.value;
 if(checkpsw.length > 5 && checkpsw.length<21){
	return 1;
   }else{
	   return false;
	   }
  var b=/^[a-zA-Z\d]\w{2,10}[a-zA-Z\d]$/;
 if (!b.test(checkpsw)) {
   return false;
 }
}
//判断两次密码输入是否一致
function check_repsw(obj1,obj2){
 var objvalue1=obj1.value;
 var objvalue2=obj2.value;
 if(objvalue1==objvalue2){
  document.getElementById("checkrepsw").innerHTML="<font color='#00c72e'>两次输入密码一致！</font>";
 }else {
  document.getElementById("checkrepsw").innerHTML="<font color='#ff0000'>两次输入的密码不一样!</font>";
 }
 }
//判断手机号码格式是否合法
function check_tel(obj){
 var objvalue=obj.value;
 var regx=/^(?:13\d|15\d|18[123456789])-?\d{5}(\d{3}|\*{3})$/;
 if(!regx.test(objvalue)){
	return false;
 }
}
//判断邮箱地址格式是否合法
function check_mail(obj){
 var strm=obj.value;
 var regm = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;//验证Mail的正则表达式,^[a-zA-Z0-9_-]:开头必须为字母,下划线,数字,
 if (!strm.match(regm)){
 	return false;
 }
}
function FormCheck()
    {
        if (check_usr(document.reg.user)==false)
        {
            alert("用户名填写有误")
            document.reg.user.focus();
            return (false);
        }
        if (check_psw(document.reg.pwd)==false)
        {
            alert("密码填写有误")
            document.reg.pwd.focus();
            return (false);
        }
 		 if (check_tel(document.reg.tel)==false)
        {
            alert("电话填写有误")
            document.reg.tel.focus();
            return (false);
        }
        if (document.reg.pwd.value!=document.reg.repwd.value) 
        {
            alert("密码和确认密码不一致")
            return (false);
        } 
		if (document.reg.qq.value=='') 
        {
            alert("qq不能为空")
            return (false);
        } 
		 if (check_mail(document.reg.email)==false)
        {
            alert("邮箱填写有误")
            document.reg.email.focus();
            return (false);
        }
        if(document.reg.zhifubao.value==""){
		alert("请填写支付宝账号!!!");
		reg.zhifubao.focus();
		return false;
	}
	if(document.reg.xingming.valu=="")
	{
		alert("请填写支付宝姓名!!!");
		reg.xingming.focus();
		return false;
	}
    }
</script>
</head>
<body>
<?php 
if (gv($info,"zhuce")==1) {
if (isset($_GET['invite'])) {
	$invite=$_GET['invite'];
	$res=sql("s", "user", "*", "where id=".$invite);
}else {
	$invite="admin";
	$res="admin";
}
?>
<!--head-->
<div class="head">
  <div class="head_con">
          <span class="logo">
            <a href="#"><img src="../tp/3/images/logo.jpg" width="389" height="67" /> </a>
          </span>
          <span class="title">
            <img src="../tp/3/images/title.jpg" width="215" height="78" /> 
          </span>
     </div>
     <div class="head_bottom_bg"></div>
</div>
<!--main-->
<div class="zc_mian">
     <div class="zc_top">
          <h2>微信主注册</h2>
          <p class="zc_top_a">有账号？请至 <a href="../index.php">首页登录！</a></p>
     </div>
     <div class="zc_con">
<?php 
if ($res) {
	if ($res=="admin") {
		$admin="admin";
	}else{
	$info=firstrow($res);
	$admin=gv($info,"user");
	}
}else {
	echo "<script>alert('你输入的邀请地址有误！'); window.location.href='/'</script>";
	exit();
}
?>
<form class="comform" name="reg" id="reg" action="../control.php?oper=reg" method="post">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr class="bottom_boder">
                <td width="80" height="77">&nbsp;</td>
                <td width="114">*用户名： </td>
                <td width="290"><label for="addusername"></label>
                <input type="text" name="user" class="zc_textbox" /></td>
                <td width="43"><img src="../tp/3/images/wdxx_ico3.jpg" width="23" height="22" /></td>
                <td class="zc_con_font">5-16个字符，唯一性 不可修改！</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*密码：</td>
                <td><input type="password" name="pwd" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">6-20个字符，英文数字字符组合</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*确认密码：</td>
                <td><input type="password" name="repwd" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*QQ：</td>
                <td><input type="text" name="qq" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">以下三种联系方式必填一种</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*手机：</td>
                <td><input type="text" name="tel" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*电子邮箱：</td>
                <td><input type="text" name="email" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
               <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*支付宝账号：</td>
                <td><input type="text" name="zhifubao" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font"> 不可更改！！ 用于 打款的支付宝账号</td>
              </tr>
               <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*支付宝姓名：</td>
                <td><input type="text" name="xingming" class="zc_textbox" /></td>
               <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">不可更改！！ 真实姓名，用于打款核对</td>
              </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*邀请码：</td>
                <td><input type="text" name="superior1" readonly value="<?=$admin;?>" class="zc_textbox" /><input type="hidden" name="superior" readonly value="<?=$admin;?>" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">无邀请码不能注册！</td>
              </tr>
              <meta charset="utf-8" />
              <tr>
    <td height="130"><input type="hidden" name="zcyzm"  value="c131ea2570f610Pai9EGJ0GgTgLiIht5W8rmrgm32Tm7R29reBr9l6A"></td>
                <td>&nbsp;</td>
                <td colspan="3">
                 <input type="submit" name="hash" value=""  class="btn-register" onClick="javascript:return FormCheck();" style="border:none; width:170px; height:49px; background:url(../tp/3/images/wdxx_qd.jpg)" />
                </td>
                </tr>
            </table>

       </form> 
     </div>
     <div style="clear:both;"></div>
</div>
 <script type="text/javascript" src="../tp/3/js/jquery.min.js"></script>
<!--foot-->
<div class="foot">
     <div class="foot_con">
          <div class="foot_con_a">
               <a href="../user/main.php">用户中心</a>
                <a href="../tp/3/info/gsjj/gsjj.html">公司简介</a>
               <a href="../tp/3/info/fclc/fclc.html">分成流程</a>
                <a href="../tp/3/info/zytz/zytz.html">重要通知</a>
               <a href="../tp/3/info/zprc/zprc.html">招聘人才</a>
                <a href="../tp/3/info/kfzx/kfzx.html">客服中心</a>
                <a href="../tp/3/info/lxwml/lxwml.html" class="boder_right">联系我们</a>
          </div>   
          
          <p class="foot_con_b mtop16 footzi">陕西丙丁信息技术有限公司 &nbsp; Copyright © 2015-2022 </p>
          <p class="foot_con_b mtopfoot footzi">陕ICP备14005298号 版权所有</p>
     </div>
     
</div>
<!--在线客服-->
<div class="fixedBox">
  <UL class="fixedBoxList">
    <LI style="display: block;" id="cartboxs" class="fixeBoxLi cart_bd">
      <P class="good_cart">0</P>
      <span class="fixeBoxSpan"></span> <strong>投诉意见</strong>
      <div class="cartBox">
        <div class="bjfff"></div>
        <div class="contactManager_box contactManager" id="cm_more">
  <!--[if IE 6]>
  <iframe src="about:blank" frameborder="0"></iframe>
  <![endif]-->
  <table>
    <tr class="contactManager_title">
      <td>
        <img src="../tp/3/images/icon_manager.jpg" alt="微群100" />
        <span>微分销</span>
      </td>
    </tr>

      <tr>
          <td>
             <a href="http://wpa.qq.com/msgrd?v=3&uin=270482281&site=qq&menu=yes" target="_blank" alt="点击这里给我发消息" title="点击这里给我发消息">
          <img src="../tp/3/images/icon_qq.jpg" alt="QQ" />
          <span>270482281</span>
        </a>
          </td>
      </tr>
    <tr>
      <td>
        <img src="../tp/3/images/icon_mobile.jpg" alt="手机号码" />
        <span>400-888-888</span>
      </td>
    </tr>
    
    <tr>
      <td>
      <a title="投诉建议邮箱" >
        <img src="../tp/3/images/icon_mail.jpg" alt="邮箱" />
        <span>712355245@qq.com</span>
      </a>
      </td>
    </tr>
  </table>

        </div>
      </div>
    </LI>
    <LI class="fixeBoxLi Home"> <A href="index.html"> <span class="fixeBoxSpan"></span> <strong>返回首页</strong> </A> </LI>
    <LI class="fixeBoxLi BackToTop"> <span class="fixeBoxSpan"></span> <strong>返回顶部</strong> </LI>
  </UL>
</div>
<div style="display:none;">
</div>
<script src="../tp/3/js/lanrenzhijia.js"></script>
<script src="/static/js/j.js?0829"></script>
<?php 
	}else{
		echo "<script> alert('请联系客服注册。');history.back();</script>";
	}
?>
</body>
</html>